cmake_minimum_required(VERSION 3.1)
cmake_policy(SET CMP0048 NEW)
project(libevbuffsock VERSION 0.1.0.0)

# options
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -O2 -DDEBUG -fPIC -lev")

include_directories("${CMAKE_CURRENT_BINARY_DIR}"
	"${PROJECT_BINARY_DIR}"
	)

set(EVBUF
buffer.c
buffered_socket.c
)

# target
add_library(evbuffsock SHARED ${EVBUF}) 

# install
install(TARGETS evbuffsock LIBRARY DESTINATION lib) 
install(FILES  evbuffsock.h DESTINATION include) 
